package com.mengyan.codesandbox.utils;

import com.mengyan.codesandbox.model.ExecuteMessage;

import java.io.IOException;

public class JdkTestUtils {
    public static void main(String[] args) {
        String compileCmd = String.format("jdk8/bin/javac -version");
        try {
            Process compileProcess = Runtime.getRuntime().exec(compileCmd);
            ExecuteMessage executeMessage = ProcessUtils.runProcessAndGetMessage(compileProcess, "编译");
            System.out.println(executeMessage);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
